package cate.game.admin.cross;

import easy.java.dev.note.NoteClass;
import easy.java.dev.note.NoteField;
import lombok.NoArgsConstructor;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

@NoArgsConstructor
@NoteClass("跨服GM请求")
public class CrossAdminReq {
    @NoteField("指令码")
    public String cmd;
    @NoteField("服务器ID")
    public int srvId;
    @NoteField("玩家唯一ID")
    public String roleUid;
    @NoteField("参数")
    public List<String> params;

    public CrossAdminReq(String cmd, int srvId, String roleUid, Object... args) {
        this.cmd = cmd;
        this.params = Arrays.stream(args).map(Object::toString).collect(Collectors.toList());
    }
}
